#include <stdio.h>
#include <stdlib.h>

typedef struct NODE {
    int val;
    struct NODE* prev;
    struct NODE* next;
} NODE;

void push(NODE** tail, int val) {
    NODE* newNode = (NODE*)malloc(sizeof(NODE));
    newNode->val = val;
    newNode->prev = *tail;
    newNode->next = NULL;
    (*tail)->next = newNode;
    *tail = newNode;
}

int main() {
    int n;
    scanf("%d", &n);
    NODE* tail = (NODE*)malloc(sizeof(NODE));
    NODE* head = tail;
    for (int i = 0; i < n; i++) {
        int v;
        scanf("%d", &v);
        push(&tail, v);
    }
    // printf("%d", (*head)->val);
    for (NODE* it = head->next; it; it = it->next) {
        printf("%d ", it->val);
    }
}